<template>
  <div>
    <TypeNav />
    <ListComponent />
    <ReCommend />
    <Rank />
    <Like />
    <Floor v-for="(floor,index) in floorList" :key="floor.id" :floor='floor'/>
    <Brand />
  </div>
</template>

<script>
import TypeNav from "@/components/TypeNav";
import ListComponent from "./ListContainer";
import ReCommend from "./ReCommend";
import Rank from "./Rank";
import Like from "./Like";
import Floor from "./Floor";
import Brand from "./Brand";
import { mapState } from "vuex"
export default {
  name: "Home",
  components: {
    TypeNav,
    ListComponent,
    ReCommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
  mounted() {
    this.getFloorList();
  },
  methods: {
    getFloorList() {
      this.$store.dispatch("getFloorList");
    },
  },
  computed: {
    ...mapState({
      floorList:state => state.home.floorList
    }),
  },
};
</script>

<style scoped>
</style>